﻿<%@ Page Language="C#" %>

<%@ Import Namespace="wojilu" %>
<%@ Import Namespace="wojilu.View" %>
<%@ Import Namespace="wojilu.Apps.Qycms.Domain" %>
<%@ Import Namespace="wojilu.Apps.Qycms.Service" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>#{softtitle}</title>
<link href="#{path.css}ybb/css/baselist.css?v=#{cssVersion}" rel="stylesheet" type="text/css" />
<link href="#{path.css}ybb/css/all.css?v=#{cssVersion}" rel="stylesheet" type="text/css" />
<link href="#{path.css}ybb/css/formdiv.css?v=#{cssVersion}" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="#{path.js}ybb/js/jquery.js?v=#{jsVersion}"></script>
<script type="text/javascript" src="#{path.js}ybb/js/control.js?v=#{jsVersion}"></script>
<script type="text/javascript" src="#{path.js}ybb/js/form.js?v=#{jsVersion}"></script>
<script type="text/javascript">

	var resizewindow= null;

	window.onresize = function(){
		var h = $(window).height();
		if(resizewindow!=h){
			sizewindow();
			resizewindow=h;
		}
	}

	function sizewindow(){
		var h = $(window).height();
		if(document.getElementById("mainbodybottonauto")){
			$('.managebottonadd').css({height:h-40});
		}
	}
	var language_js_lngtitle_empty = "_{language_js_lngtitle_empty}";
	var language_js_packcopy_ok = "_{language_js_packcopy_ok}";
	var language_js_packcopy_no = "_{language_js_packcopy_no}";
	var iframename = "#{iframename}";
	$(document).ready(function(){
	    var h = '#{iframeheightwindow}';
		$('.managebottonadd').css({height:h-40});
		var options = {
			beforeSubmit: formverify,
			success:saveResponse
		}
		$('#lngpackcopy').submit(function() {
			$(this).ajaxSubmit(options);
			return false;
		});
	})




	function formverify(formData) {
	    parent.windowsdig('Loading', '#{load}', '400px', '180px', 'iframe', false);
	}
	function saveResponse(options){
		parent.closeifram();
		if (options=='true'){
			alert(language_js_packcopy_ok);
		}else{
			alert(language_js_packcopy_no);
		}
		parent.onaletdoc()
	}
</script>
</head>

<body>
<%var lngread = v.data("lngread") as Lng; %>
<form name="lngpackcopy" id="lngpackcopy" method="post" action="#{ActionLink}">
<div id="mainbodybottonauto" class="managebottonadd">
	<div class="maindobycontent">
		<div class="suggestion">
			<span class="sugicon"><span class="strong colorgorning2">_{position_title}</span><span class="colorgorningage">_{language_packcopy_mess}<u><%=lngread.lngtitle %></u></span></span>
		</div>
		<div class="manageeditdiv">
			<div class="maneditcontent">
				<table class="formtable">
					<tr class="trstyle2">
						<td class="trtitle03" colspan="2">_{language_add_copy_mess}</td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{language_add_copy_lng1}</td>
						<td width="85%" class="trtitle02"><%=lngread.lng %></td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{language_add_lngtitle}</td>
						<td width="85%" class="trtitle02"><%=lngread.lngtitle %></td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{language_add_copy_lng}</td>
						<td width="85%" class="trtitle02">
							<select size="1" name="tolng" id="tolng">
                            <%var lnglist = v.data("lnglist") as List<Lng>; %>
                            <%foreach(var row in lnglist){ %>
                                <%if(lngread.Id !=row.Id || lngread.lng !=row.lng){ %>
								<option value="<%=row.lng %>"><%=row.lngtitle %></option>
								<%} %>
							<%} %>
							</select>
							<span class="cautiontitle">_{language_add_copy_lng_mess}</span>
						</td>
					</tr>
				</table>
			</div>
		</div>
	</div>
</div>
<div id="downbotton">
	<div id="subbotton">
		<table border="0" width="100%">
			<tr>
				<td id="right"><input type="submit" name="Submit" value="_{botton_copy}" class="buttonface" /></td>
				<td id="left" class="padding-left5"><input type="button" name="cancel" onclick="javascript:parent.onaletdoc();" value="_{botton_copy_reset}" class="buttonface" /></td>
			</tr>
		</table>
	</div>
</div>
</form>
</body>

</html>